Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: special negative-conditional cache for two properties that are very important for princess calculations #6463

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Scoppio
Copy link
Collaborator

@Scoppio Scoppio commented Jan 30, 2025

this property only caches false, any other value and it will have to recalculate itself every time until it turns to false. So, for the most part, it is going to be fast.

Also, it looks like it has no side-effects on other places since other places rely on the unit during gameplay, or loading it directly from a file.

There is also a reset builtin the property to make sure it is renewed every turn, so if it does not have the property it will calculate it at least once.

It still needs some more information on the API of the methods to explain why and how, and better testing from my part, comparing with and without the variable enabled.

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.59%. Comparing base (54e363b) to head (18a8f95).
Report is 37 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6463   +/-   ##
=========================================
  Coverage     28.59%   28.59%           
- Complexity    14377    14384    +7     
=========================================
  Files          2798     2798           
  Lines        274895   274904    +9     
  Branches      48630    48631    +1     
=========================================
+ Hits          78593    78606   +13     
+ Misses       191669   191663    -6     
- Partials       4633     4635    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HammerGS HammerGS added the For New Dev Cycle This PR should be merged at the beginning of a dev cycle label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For New Dev Cycle This PR should be merged at the beginning of a dev cycle Performance Princess/AI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants